home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / TouchMe 1.1.1.sit / touchMe 1.11 Folder / CW9 PP source / source / Common / CRadioButton.cp < prev    next >
Text File  |  1996-08-08  |  2KB  |  106 lines

  1. // ==================================================
  2. //    CRadioButton.cp
  3. //    Copyright (C) 1996 Mizutori Tetsuya, July 4 1996.
  4. // ==================================================
  5. //    All documents are pretty-printed in Geneva 10-point font.
  6.  
  7. #include <UDrawingState.h>
  8.  
  9. #include "touchMeConstants.h"
  10. #include "CRadioButton.h"
  11.  
  12.  
  13. // --------------------------------------------------
  14. //        ・ CreateRadioButtonStream [static]
  15. // --------------------------------------------------
  16.  
  17. CRadioButton *
  18. CRadioButton::CreateRadioButtonStream(
  19.     LStream    *inStream )
  20. {
  21.     return new CRadioButton( inStream );
  22. }
  23.  
  24.  
  25. // --------------------------------------------------
  26. //        ・ CRadioButton
  27. // --------------------------------------------------
  28.  
  29. CRadioButton::CRadioButton()
  30. {
  31. }
  32.  
  33.  
  34. // --------------------------------------------------
  35. //        ・ CRadioButton(SPaneInfo&, MessageT, Int32, ResIDT, Str255)
  36. // --------------------------------------------------
  37.  
  38. CRadioButton::CRadioButton(
  39.     const SPaneInfo    &inPaneInfo,
  40.     MessageT        inValueMessage,
  41.     Int32            inValue,
  42.     ResIDT            inTextTraitsID,
  43.     Str255            inTitle )
  44.         : LStdRadioButton( inPaneInfo, inValueMessage,
  45.             inValue, inTextTraitsID, inTitle )
  46. {
  47. }
  48.  
  49.  
  50. // --------------------------------------------------
  51. //        ・ CRadioButton(const CRadioButton&)
  52. // --------------------------------------------------
  53.  
  54. CRadioButton::CRadioButton(
  55.     const CRadioButton    &inOriginal )
  56.         : LStdRadioButton( inOriginal )
  57. {
  58. }
  59.  
  60.  
  61. // --------------------------------------------------
  62. //        ・ CRadioButton(LStream*)
  63. // --------------------------------------------------
  64.  
  65. CRadioButton::CRadioButton(
  66.     LStream    *inStream )
  67.         : LStdRadioButton( inStream )
  68. {
  69. }
  70.  
  71.  
  72. // --------------------------------------------------
  73. //        ・ ~CRadioButton
  74. // --------------------------------------------------
  75.  
  76. CRadioButton::~CRadioButton()
  77. {
  78. }
  79.  
  80. // --------------------------------------------------
  81. //        ・ ListenToMessage
  82. // --------------------------------------------------
  83.  
  84. void
  85. CRadioButton::ListenToMessage(
  86.     MessageT    inMessage,
  87.     void        *ioParam )
  88. {
  89. #pragma unused( ioParam )
  90.  
  91.     switch ( inMessage ) {
  92.  
  93.         case msg_TmeD_CrCheckbox:
  94.         case msg_TmeD_MdCheckbox:
  95.             if ( IsEnabled() ) {
  96.                 Disable();
  97.             } else {
  98.                 Enable();
  99.             }
  100.             break;
  101.  
  102.     }
  103. }
  104.  
  105. // end of program
  106.